<template>
	<image class='chechbox' :src="`/static/img/icon/${value? checkIcon:unCheckIcon}.png`" mode="" @click.stop="change"></image>
</template>

<script>
	export default {
		props:{
			value:false,
			disabled:false
		},
		model:{
			prop:"value",
			event:"change"
		},
		name:"z-checkbox",
		data() {
			return {
				checkIcon:"checked-icon",
				unCheckIcon:'uncheck-icon'
			};
		},
		methods:{
			change(){
				if(!this.disabled){
					this.$emit('change',!this.value);
				}
			}
		}
	}
</script>

<style lang="scss">
.chechbox{
	width: 32rpx;
	height: 32rpx;
}
</style>